package homework.employee;

public class HourEmployee extends Employee{
    private double workHours;
    private double hourSalary;

    public double earning(){
        return workHours*hourSalary;
    }
    public String getInfo(){
        return super.getName()+"的实发工资为"+earning()+"元,时薪是"+hourSalary+"元,工作小时数是"+workHours+"小时";
    }
}
